$(function () {
    findTopFoot();
})

function findTopFoot() {
    let data = myAjax("/TopFoot", 'get', {})
    console.log(data);
    setNavHtml(data.navModelList);
    setCompanyModel(data.companyModel);
}

function setCompanyModel(data) {
    $("#logo").html(data.logo);
    $("#phone").html(data.phone);
    $("#ad").html(data.ad);
    $("#net").html(data.net);
    $("#email").html("邮箱:" + data.email);
    $("#linePhone").html(data.linePhone);
    $("#addresss").html(data.addresss);
    $("#version").html(data.version);


}

function setNavHtml(data) {
    let html = '';
    for (let i = 0; i < data.length; i++) {
        html += '<a href="' + data[i].href + '">\n' +
            ' <div>' + data[i].name + '</div>\n' +
            ' </a>';
    }
    $("#navHtml").html(html);
}